package com.designpattern.structure.adapter.newadapter;

/**
 * @author Administration
 * @date 2021/10/15 - 16:23 - 星期五
 * @project 结构性模式中的适配器模式  适配器对象  目标类
 * @package com.designpattern.structure.adapter.newadapter
 * @by 晨
 */
public class SDAdapterTF implements SDCard{

    private TFCard tfCard;

    public SDAdapterTF(TFCard tfCard) {
        this.tfCard = tfCard;
    }

    @Override
    public String readSD() {
        System.out.println("adapter read tf card ");
        return tfCard.readTF();
    }

    @Override
    public void writeSD(String msg) {
        System.out.println("adapter write tf card");
        tfCard.writeTF(msg);
    }
}
